Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@dnd-kit/utilities

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dnd-kit/utilities

Internal utilities to bee shared between `@dnd-kit` packages

  • 1.0.3
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is @dnd-kit/utilities?

The @dnd-kit/utilities package provides a set of utility functions and types that are designed to be used with the @dnd-kit/core package for building drag and drop interfaces. These utilities help with common tasks such as managing keyboard events, coordinates, and other drag and drop related calculations.

What are @dnd-kit/utilities's main functionalities?

Coordinates

Utilities for managing coordinates, such as calculating relative positions for drag and drop elements.

{"getRelativeTransform": (x, y) => `translate3d(${x}px, ${y}px, 0)`}

Keyboard Coordinates

Functions to handle keyboard events and convert them into coordinates for keyboard accessible drag and drop functionality.

{"keyboardCoordinates": (event) => ({x: event.clientX, y: event.clientY})}

Distance Measurement

Functions to measure the distance between two points, useful for determining drag thresholds and more.

{"distance": (x1, y1, x2, y2) => Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2))}

Other packages similar to @dnd-kit/utilities

FAQs

Package last updated on 24 Mar 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc